
.p-game {
  height: auto;

  > .inner {
    // font-size: 0;
    //padding: 40px;
    height: 100vh;
    overflow: hidden;
    position: relative;
    @include boxSize();

    .position-center {
      text-align: center;
    }

    .starter {
      width: 100vw;
      height: 100vh;
      position: fixed;
      left: 0;
      top: 0;
      background: #181a1f;
      z-index: 100;

      > .inner {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        @include borderRadius(8px);
        @include boxSize();
        color: #fff;
        text-align: center;

        .title {
          font-size: 20px;
          text-align: center;
          padding: 20px 0 8px;
        }

        img {
          width: 100%;
          @include borderRadius(10px);
        }
      }
    }

    .header {
      display: flex;
      color: #fff;
      justify-content: space-between;
      align-items: center;
      font-size: 16px;
      padding: 16px 32px;
      margin-bottom: 16px;
    }

    #game-wrapper {
      position: relative;
      //position: absolute;
      //left: 50%;
      //top: calc(50% - 200px);
      //width: 320px;
      //@include transform(translateX(-50%));

      #game-render{
        position: absolute;
        top: 0;
        width: 100%;
        left: 0;
        pointer-events: none;
        opacity: 0.4;
      }

      #game {
        width: 100vw;
        height: calc(100vh - 100px);
      }
    }
  }

  .board {
    position: fixed;
    top: 60px;
    left: 50%;
    @include transform(translateX(-50%));
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    width: 80vw;
    color: #fff;

    .val {
      padding-left: 40px;
      line-height: 49px;
    }

    .timer-wrapper {
      width: 150px;
      height: 40px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      // background-image: url("#{$base_path}/img/game/game-timer.png")
    }

    .score-wrapper {
      width: 150px;
      height: 40px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      // background-image: url("#{$base_path}/img/game/game-score.png")
    }
  }

  .dashboard {
    width: 100vw;
    height: 100px;
    background: #74aee0;
    position: fixed;
    bottom: 0;

    > .inner {
      position: relative;
      width: 100%;
      height: 100%;
    }

    .car {
      position: absolute;
      height: 16vw;
      z-index: 11;
      top: 40%;
      @include transform(translateY(-50%));
    }

    .battery-wrapper {
      position: absolute;
      top: 30%;
      left: 50%;
      @include transform(translate(-50%, -50%));
      width: 60vw;
      height: 11vw;
      background-position: center;
      background-size: contain;
      background-repeat: no-repeat;
      // background-image: url(#{$base_path}/img/game/game-battery-underlay.png);
      padding: 6px 8px 6px 6px;
      z-index: 10;
      @include boxSize();

      > .battery-bar {
        position: relative;
        @include transition();
        height: 100%;
        background: #000;
        @include borderRadius(3px);
        @include gradient(102deg, #4391fe, #9cec69);
        overflow: hidden;
        z-index: 11;

        .light {
          height: 70%;
          left: 60%;
          position: absolute;
          top: 50%;
          @include transform(translate(-50%, -50%));
        }
      }
    }
  }
}

@keyframes bling {
  from {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes shake {
  from {
    transform: translateX(0);
  }
  25% {
    transform: translateY(-1px);
  }
  33% {
    transform: translateX(-1px);
  }
  66% {
    transform: translateX(1px);
  }
  75% {
    transform: translateY(1px);
  }
  to {
    transform: translateX(0);
  }
}

@-webkit-keyframes shake {
  from {
    transform: translateX(0);
  }
  25% {
    transform: translateY(-1px);
  }
  33% {
    transform: translateX(-1px);
  }
  66% {
    transform: translateX(1px);
  }
  75% {
    transform: translateY(1px);
  }
  to {
    transform: translateX(0);
  }
}

@-webkit-keyframes bling {
  from {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes animateStripes {
  0% {
    transform: translateY(-1000px);
  }
  100% {
    // transform: translateX( calc(var(--stripes-size) * -1) );
    transform: translateY(0);
  }
}

.cp-game-end {
  width: 100vw;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;

  > .inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    @include borderRadius(8px);
    @include boxSize();
    color: #fff;
    text-align: center;

    .top {
      font-size: 16px;
      text-align: center;
      padding: 20px 0 8px;

      font {
        font-size: 32px;
      }
    }

    img {
      width: 70%;
      @include borderRadius(10px);
      @include boxShadow();
    }
  }
}


@-webkit-keyframes MOVE-BG {
  from {
    -webkit-transform: translateX(0);
  }
  to {
    -webkit-transform: translateX(46px);
  }
}

@keyframes MOVE-BG {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(46px);
  }
}


.loading {
  height: auto;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 1rem;
  margin: 3%;
  font-style: italic;
}

.power {
  position: absolute;
  left: -46px;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0.3;

  background: -webkit-repeating-linear-gradient(
                  145deg,
                  #f8e9db 1px,
                  #fff5ed 2px,
                  #fff5ed 11px,
                  #f8e9db 12px,
                  #f8e9db 20px
  );
  background: repeating-linear-gradient(
                  -55deg,
                  #f8e9db 1px,
                  #fff5ed 2px,
                  #fff5ed 11px,
                  #f8e9db 12px,
                  #f8e9db 20px
  );

  -webkit-animation-name: MOVE-BG;
  -webkit-animation-duration: .6s;
  -webkit-animation-timing-function: linear;
  -webkit-animation-iteration-count: infinite;

  animation-name: MOVE-BG;
  animation-duration: .6s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

